home *** CD-ROM | disk | FTP | other *** search
- *** ../step03/supcmain.c Thu Dec 16 14:59:50 1993
- --- supcmain.c Fri Dec 17 12:49:40 1993
- ***************
- *** 325,330 ****
- --- 325,334 ----
- #define SYS_rpause (-5)
- #endif
- #endif
- + #ifdef _ABI_SOURCE
- + /*XXX #include <sys/time.h> */
- + #include <sys/resource.h>
- + #endif
-
- /*********************************************
- *** G L O B A L V A R I A B L E S ***
- ***************
- *** 360,365 ****
- --- 364,370 ----
- struct stat sbuf;
- #ifdef _ABI_SOURCE
- struct sigaction ignvec,oldvec;
- + struct rlimit rl;
- #else
- struct sigvec ignvec,oldvec;
- #endif
- ***************
- *** 420,427 ****
- --- 425,438 ----
- int fd;
- loginfo ("SUP Restarting %s with new supfile %s",
- progname,supfname);
- + #ifdef _ABI_SOURCE
- + getrlimit (RLIMIT_NOFILE, &rl);
- + for (fd = rl.rlim_max; fd > 3; fd--)
- + (void) close (fd);
- + #else
- for (fd = getdtablesize (); fd > 3; fd--)
- (void) close (fd);
- + #endif
- execv (progname,argv);
- logquit (1,"Restart failed");
- }
-